package com.example.scheduled.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class YmlTasks {

    @Scheduled(cron = "${task.cron.task1}")
    public void runTask1() {
        System.out.println("读取yml配置文件task1");
    }

    @Scheduled(cron = "${task.cron.task2}")
    public void runTask2() {
        System.out.println("读取yml配置文件task2");
    }
}